import React,{ Component} from 'react';
import { View} from '@tarojs/components';
// import  PropTypes from 'prop-types';

interface Props {
     obs?: string;
     childDom?:any;
}
export default class Card extends Component<Props, {}> {
     constructor(props: Props){
         super(props)
        
     }
     state={
         content:"<h1>标题</h1><p>html标签</p>",
     }
    //  static propTypes={
    //         obs:PropTypes.string.isRequired,
    //         childDom:PropTypes.node.isRequired
    // }
    
    render() {
        return (
            <View>
                 我是卡片组件
                 {this.props.obs}
                 {this.props.childDom}
                <View dangerouslySetInnerHTML={{ __html: this.state.content }}></View>
            </View>
        )
    }

}


